package file;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-10-02
 * Time: 16:45
 */
//使用Writer将数据写入文件
public class Demo9 {
    public static void main(String[] args) throws IOException {
        try(Writer writer=new FileWriter("D:/test.txt",true)){
            writer.write(" 2 hello world ");
        }
    }
}
